echo 'export JAVA_HOME=/usr/share/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
' >> /etc/profile

echo 'source /etc/profile' >> ~/.bashrc